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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: A = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: B = None
        self.p: C = None
        self.r: C = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: D = None
        self.w: D = None
        self.txt = txt

g = A("g")
e = B("e")
a = C("a")
f = D("f")
k = E("k")
h = B("h")
n = B("n")
l = E("l")
j = D("j")
b = D("b")

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: A = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: B = None
        self.p: C = None
        self.r: C = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: D = None
        self.w: D = None
        self.txt = txt

g = A("g")
e = B("e")
a = C("a")
f = D("f")
k = E("k")
h = B("h")
n = B("n")
l = E("l")
j = D("j")
b = D("b")

g.t = a
e.s = h
e.y = h
e.v = b
e.u = a
a.o = g
a.u = g
a.q = e
f.s = b
f.x = n
f.p = a
f.r = a
f.w = h
k.v = e
k.q = b
k.w = j
h.s = e
h.y = e
h.v = b
h.u = a
n.s = e
n.y = e
n.v = j
n.u = a
l.v = n
l.q = f
l.w = f
j.s = f
j.x = e
j.p = a
j.r = a
j.w = n
b.s = f
b.x = n
b.p = a
b.r = a
b.w = e
assert h.u.o.t.q.u.u.txt == "g"