class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: D = None
        self.p: A = None
        self.t: H = None
        self.x: C = None
        self.z: D = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: G = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: C = None
        self.v: D = None
        self.o: E = None
        self.q: B = None
        self.txt = txt

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

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

i = A("i")
e = B("e")
c = C("c")
b = D("b")
f = E("f")
d = F("d")
j = G("j")
a = H("a")
m = A("m")

i.w = d
i.y = d
i.s = b
i.z = b
i.p = m
i.t = a
i.x = c
e.x = j
c.v = m
c.u = e
b.z = c
b.y = j
b.u = m
f.p = c
d.w = j
d.x = c
d.v = b
d.o = f
d.q = e
j.q = e
j.u = i
a.t = c
a.x = f
a.v = f
a.w = j
a.s = d
a.y = b
m.w = d
m.y = d
m.s = b
m.z = b
m.p = i
m.t = a
m.x = c
assert e.x.q.x.q.x.u.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: D = None
        self.p: A = None
        self.t: H = None
        self.x: C = None
        self.z: D = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: G = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: C = None
        self.v: D = None
        self.o: E = None
        self.q: B = None
        self.txt = txt

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

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

i = A("i")
e = B("e")
c = C("c")
b = D("b")
f = E("f")
d = F("d")
j = G("j")
a = H("a")
m = A("m")

i.w = d
i.y = d
i.s = b
i.z = b
i.p = m
i.t = a
i.x = c
e.x = j
c.v = m
c.u = e
b.z = c
b.y = j
b.u = m
f.p = c
d.w = j
d.x = c
d.v = b
d.o = f
d.q = e
j.q = e
j.u = i
a.t = c
a.x = f
a.v = f
a.w = j
a.s = d
a.y = b
m.w = d
m.y = d
m.s = b
m.z = b
m.p = i
m.t = a
m.x = c
assert e.x.q.x.q.x.u.txt == "i"