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

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

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

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

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

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

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

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

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

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

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

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

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

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

m.x = c
m.y = g
m.o = l
m.t = b
m.w = b
c.s = m
c.o = k
g.s = b
g.x = f
g.w = l
f.s = d
f.x = j
f.q = m
b.z = k
k.t = g
k.q = c
k.o = c
k.s = j
j.t = g
j.q = c
j.o = c
j.s = k
l.s = b
l.x = d
l.w = g
d.s = f
d.x = k
d.q = m
assert f.s.x.s.s.s.s.txt == "k"