class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: D = None
        self.o: B = None
        self.s: E = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: H = None
        self.p: E = None
        self.z: H = None
        self.u: D = None
        self.y: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: D = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: H = None
        self.p: E = None
        self.z: H = None
        self.u: D = None
        self.y: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: D = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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