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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: D = None
        self.t: A = None
        self.q: A = None
        self.z: A = None
        self.txt = txt

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

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

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

i = A("i")
f = B("f")
l = C("l")
h = D("h")
b = E("b")
g = F("g")
k = B("k")
c = F("c")
a = F("a")
d = E("d")

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: D = None
        self.t: A = None
        self.q: A = None
        self.z: A = None
        self.txt = txt

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

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

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

i = A("i")
f = B("f")
l = C("l")
h = D("h")
b = E("b")
g = F("g")
k = B("k")
c = F("c")
a = F("a")
d = E("d")

i.t = a
i.y = a
f.s = b
f.v = l
f.o = l
f.q = g
f.y = i
f.w = h
l.o = i
l.t = i
l.q = i
l.z = i
l.s = h
h.v = c
b.v = d
b.y = a
g.u = l
k.s = d
k.v = l
k.o = l
k.q = c
k.y = i
k.w = h
c.u = l
a.u = l
d.v = b
d.y = c
assert k.w.v.u.s.v.u.s.v.u.s.txt == "h"