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

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

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

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

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

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

j = A("j")
d = B("d")
k = C("k")
n = D("n")
m = E("m")
g = F("g")
e = A("e")
h = C("h")
l = A("l")

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

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

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

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

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

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

j = A("j")
d = B("d")
k = C("k")
n = D("n")
m = E("m")
g = F("g")
e = A("e")
h = C("h")
l = A("l")

j.t = d
j.z = e
j.v = e
j.q = k
j.y = n
d.p = n
d.u = m
d.x = m
k.s = l
k.w = n
k.x = m
k.r = e
k.o = e
n.z = d
n.u = m
m.y = d
g.o = k
g.t = j
g.s = j
g.w = e
g.u = d
g.y = l
e.t = d
e.z = l
e.q = h
e.v = j
e.y = n
h.s = e
h.r = e
h.w = n
h.x = m
h.o = j
l.t = d
l.z = e
l.v = e
l.q = k
l.y = n
assert j.t.x.y.x.y.p.z.p.txt == "n"