class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: C = None
        self.w: A = None
        self.u: E = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: A = None
        self.y: A = None
        self.z: G = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: H = None
        self.u: H = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: H = None
        self.x: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: D = None
        self.x: E = None
        self.y: G = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: B = None
        self.v: D = None
        self.q: B = None
        self.x: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: C = None
        self.w: A = None
        self.u: E = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: A = None
        self.y: A = None
        self.z: G = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: H = None
        self.u: H = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: H = None
        self.x: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: D = None
        self.x: E = None
        self.y: G = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: B = None
        self.v: D = None
        self.q: B = None
        self.x: D = None
        self.txt = txt

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

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