class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: G = None
        self.x: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: H = None
        self.x: C = None
        self.v: C = None
        self.q: F = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

d = A("d")
l = B("l")
g = C("g")
e = D("e")
k = E("k")
a = F("a")
f = G("f")
j = H("j")

d.z = j
d.o = f
d.x = e
l.q = a
l.x = e
g.r = d
g.x = e
g.u = l
e.u = l
k.t = l
k.y = l
k.p = j
k.x = g
k.v = g
k.q = a
a.o = f
f.o = d
j.w = l
j.r = g
j.x = g
j.u = g
j.y = a
assert a.o.o.x.u.x.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: G = None
        self.x: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: H = None
        self.x: C = None
        self.v: C = None
        self.q: F = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

d = A("d")
l = B("l")
g = C("g")
e = D("e")
k = E("k")
a = F("a")
f = G("f")
j = H("j")

d.z = j
d.o = f
d.x = e
l.q = a
l.x = e
g.r = d
g.x = e
g.u = l
e.u = l
k.t = l
k.y = l
k.p = j
k.x = g
k.v = g
k.q = a
a.o = f
f.o = d
j.w = l
j.r = g
j.x = g
j.u = g
j.y = a
assert a.o.o.x.u.x.u.x.txt == "e"