class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: D = None
        self.o: D = None
        self.p: C = None
        self.r: D = None
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: F = None
        self.t: D = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: F = None
        self.r: E = None
        self.u: A = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: F = None
        self.t: D = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: F = None
        self.r: E = None
        self.u: A = None
        self.w: D = None
        self.txt = txt

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

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

j.s = f
j.p = f
j.u = m
j.o = m
j.r = m
j.z = l
i.o = a
f.x = i
f.v = i
f.w = k
f.t = m
m.t = j
m.x = l
g.q = j
g.u = j
g.y = k
g.r = a
g.w = m
c.q = m
c.t = l
a.q = j
a.u = j
a.y = c
a.r = g
a.w = m
k.q = m
k.t = l
l.o = g
assert k.q.t.o.t.txt == "j"