class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: B = None
        self.o: B = None
        self.w: B = None
        self.p: C = None
        self.u: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: B = None
        self.p: E = None
        self.s: F = None
        self.v: B = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: B = None
        self.p: E = None
        self.s: F = None
        self.v: B = None
        self.q: E = None
        self.txt = txt

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

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