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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: A = None
        self.y: C = None
        self.z: B = None
        self.w: E = None
        self.p: C = None
        self.txt = txt

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

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

j = A("j")
d = B("d")
n = C("n")
f = D("f")
h = E("h")
b = F("b")
l = F("l")
a = A("a")

j.s = h
j.o = h
j.t = n
j.x = f
j.v = f
d.p = j
d.o = h
d.y = b
n.o = d
f.s = d
f.z = d
f.t = a
f.y = n
f.p = n
f.w = h
h.s = d
h.u = d
h.w = f
b.t = d
b.o = d
b.y = j
b.w = n
b.u = f
b.z = l
l.t = d
l.o = d
l.y = a
l.w = n
l.u = f
l.z = b
a.s = h
a.o = h
a.t = n
a.x = f
a.v = f
assert a.t.o.o.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: E = None
        self.t: C = None
        self.x: D = None
        self.v: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: A = None
        self.y: C = None
        self.z: B = None
        self.w: E = None
        self.p: C = None
        self.txt = txt

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

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

j = A("j")
d = B("d")
n = C("n")
f = D("f")
h = E("h")
b = F("b")
l = F("l")
a = A("a")

j.s = h
j.o = h
j.t = n
j.x = f
j.v = f
d.p = j
d.o = h
d.y = b
n.o = d
f.s = d
f.z = d
f.t = a
f.y = n
f.p = n
f.w = h
h.s = d
h.u = d
h.w = f
b.t = d
b.o = d
b.y = j
b.w = n
b.u = f
b.z = l
l.t = d
l.o = d
l.y = a
l.w = n
l.u = f
l.z = b
a.s = h
a.o = h
a.t = n
a.x = f
a.v = f
assert a.t.o.o.u.txt == "d"