class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: F = None
        self.z: F = None
        self.o: F = None
        self.x: C = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: F = None
        self.y: E = None
        self.txt = txt

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

i = A("i")
f = B("f")
g = C("g")
c = D("c")
d = E("d")
a = F("a")
h = E("h")
l = B("l")
k = A("k")
j = C("j")

i.t = f
i.s = k
f.v = l
f.x = i
f.o = c
f.w = h
f.z = g
g.q = d
c.u = a
c.r = a
c.z = a
c.o = a
c.s = a
c.x = j
d.v = g
d.u = a
d.y = h
a.x = h
h.v = g
h.u = a
h.y = d
l.v = f
l.x = k
l.o = c
l.w = h
l.z = j
k.t = f
k.s = i
j.q = d
assert d.v.q.u.x.y.v.q.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: F = None
        self.z: F = None
        self.o: F = None
        self.x: C = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: F = None
        self.y: E = None
        self.txt = txt

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

i = A("i")
f = B("f")
g = C("g")
c = D("c")
d = E("d")
a = F("a")
h = E("h")
l = B("l")
k = A("k")
j = C("j")

i.t = f
i.s = k
f.v = l
f.x = i
f.o = c
f.w = h
f.z = g
g.q = d
c.u = a
c.r = a
c.z = a
c.o = a
c.s = a
c.x = j
d.v = g
d.u = a
d.y = h
a.x = h
h.v = g
h.u = a
h.y = d
l.v = f
l.x = k
l.o = c
l.w = h
l.z = j
k.t = f
k.s = i
j.q = d
assert d.v.q.u.x.y.v.q.u.x.txt == "h"