class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: E = None
        self.z: D = None
        self.p: F = None
        self.u: H = None
        self.o: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: H = None
        self.v: H = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: H = None
        self.p: D = None
        self.u: G = None
        self.x: C = None
        self.s: E = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: C = None
        self.s: B = None
        self.w: B = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: C = None
        self.w: G = None
        self.q: A = None
        self.p: E = None
        self.y: G = None
        self.txt = txt

c = A("c")
l = B("l")
a = C("a")
b = D("b")
n = E("n")
i = F("i")
g = G("g")
e = H("e")

c.t = l
c.y = n
c.z = b
c.p = i
c.u = e
c.o = e
l.p = g
l.w = c
a.r = e
a.u = b
b.u = i
b.s = e
b.v = e
b.o = c
n.s = g
n.u = b
i.w = e
i.y = e
i.r = e
i.p = b
i.u = g
i.x = a
i.s = n
g.u = e
g.y = a
g.s = l
g.w = l
g.v = i
e.r = a
e.t = a
e.w = g
e.y = g
e.q = c
e.p = n
assert c.z.v.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: E = None
        self.z: D = None
        self.p: F = None
        self.u: H = None
        self.o: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: H = None
        self.v: H = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: H = None
        self.p: D = None
        self.u: G = None
        self.x: C = None
        self.s: E = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: C = None
        self.s: B = None
        self.w: B = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: C = None
        self.w: G = None
        self.q: A = None
        self.p: E = None
        self.y: G = None
        self.txt = txt

c = A("c")
l = B("l")
a = C("a")
b = D("b")
n = E("n")
i = F("i")
g = G("g")
e = H("e")

c.t = l
c.y = n
c.z = b
c.p = i
c.u = e
c.o = e
l.p = g
l.w = c
a.r = e
a.u = b
b.u = i
b.s = e
b.v = e
b.o = c
n.s = g
n.u = b
i.w = e
i.y = e
i.r = e
i.p = b
i.u = g
i.x = a
i.s = n
g.u = e
g.y = a
g.s = l
g.w = l
g.v = i
e.r = a
e.t = a
e.w = g
e.y = g
e.q = c
e.p = n
assert c.z.v.w.txt == "g"