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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: D = None
        self.p: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: B = None
        self.s: A = None
        self.w: C = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: D = None
        self.p: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: B = None
        self.s: A = None
        self.w: C = None
        self.z: A = None
        self.txt = txt

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

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