class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: B = None
        self.v: A = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: C = None
        self.y: C = None
        self.u: F = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: D = None
        self.z: E = None
        self.t: F = None
        self.p: E = None
        self.u: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: B = None
        self.txt = txt

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

k.t = e
k.p = e
k.z = l
k.v = f
l.z = e
l.o = a
l.y = a
l.u = h
l.w = h
a.r = e
a.z = e
a.p = e
a.s = i
a.u = i
a.t = h
i.z = b
i.x = e
i.o = e
e.w = k
h.w = f
h.o = l
b.t = e
b.p = e
b.z = l
b.v = k
f.t = e
f.p = e
f.z = l
f.v = k
assert l.y.u.z.t.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: B = None
        self.v: A = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: C = None
        self.y: C = None
        self.u: F = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: D = None
        self.z: E = None
        self.t: F = None
        self.p: E = None
        self.u: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: B = None
        self.txt = txt

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

k.t = e
k.p = e
k.z = l
k.v = f
l.z = e
l.o = a
l.y = a
l.u = h
l.w = h
a.r = e
a.z = e
a.p = e
a.s = i
a.u = i
a.t = h
i.z = b
i.x = e
i.o = e
e.w = k
h.w = f
h.o = l
b.t = e
b.p = e
b.z = l
b.v = k
f.t = e
f.p = e
f.z = l
f.v = k
assert l.y.u.z.t.w.t.txt == "e"