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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: D = None
        self.s: C = None
        self.v: F = None
        self.u: D = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: E = None
        self.u: F = None
        self.v: B = None
        self.t: D = None
        self.z: B = None
        self.s: B = None
        self.p: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: D = None
        self.s: C = None
        self.v: F = None
        self.u: D = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: E = None
        self.u: F = None
        self.v: B = None
        self.t: D = None
        self.z: B = None
        self.s: B = None
        self.p: H = None
        self.txt = txt

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

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

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