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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: A = None
        self.q: F = None
        self.v: B = None
        self.o: F = None
        self.txt = txt

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

h = A("h")
i = B("i")
n = C("n")
k = D("k")
c = E("c")
e = F("e")
b = E("b")
f = E("f")
j = A("j")
a = E("a")

h.u = j
i.z = a
i.u = c
n.v = i
k.s = i
k.t = i
c.s = n
c.x = j
c.q = e
c.o = e
c.v = i
e.y = j
e.x = j
e.z = i
b.s = n
b.x = j
b.q = e
b.o = e
b.v = i
f.s = n
f.x = j
f.q = e
f.o = e
f.v = i
j.u = h
a.s = n
a.x = j
a.q = e
a.o = e
a.v = i
assert c.v.u.x.u.u.u.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: A = None
        self.q: F = None
        self.v: B = None
        self.o: F = None
        self.txt = txt

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

h = A("h")
i = B("i")
n = C("n")
k = D("k")
c = E("c")
e = F("e")
b = E("b")
f = E("f")
j = A("j")
a = E("a")

h.u = j
i.z = a
i.u = c
n.v = i
k.s = i
k.t = i
c.s = n
c.x = j
c.q = e
c.o = e
c.v = i
e.y = j
e.x = j
e.z = i
b.s = n
b.x = j
b.q = e
b.o = e
b.v = i
f.s = n
f.x = j
f.q = e
f.o = e
f.v = i
j.u = h
a.s = n
a.x = j
a.q = e
a.o = e
a.v = i
assert c.v.u.x.u.u.u.u.u.txt == "h"