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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: C = None
        self.txt = txt

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

i = A("i")
h = B("h")
e = C("e")
l = D("l")
a = E("a")
g = F("g")
k = G("k")
c = H("c")
f = D("f")
n = E("n")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: C = None
        self.txt = txt

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

i = A("i")
h = B("h")
e = C("e")
l = D("l")
a = E("a")
g = F("g")
k = G("k")
c = H("c")
f = D("f")
n = E("n")

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