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

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

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

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

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

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

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

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

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

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

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

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

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

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

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