class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: E = None
        self.x: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.o: A = None
        self.y: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: G = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.o: A = None
        self.y: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: G = None
        self.y: A = None
        self.txt = txt

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

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