class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: E = None
        self.p: B = None
        self.x: A = None
        self.t: E = None
        self.z: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: B = None
        self.y: D = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: F = None
        self.y: C = None
        self.o: E = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: B = None
        self.y: D = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: F = None
        self.y: C = None
        self.o: E = None
        self.v: F = None
        self.txt = txt

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

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