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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: C = None
        self.z: C = None
        self.s: C = None
        self.u: E = None
        self.txt = txt

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

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

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

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

n = A("n")
h = B("h")
a = C("a")
j = D("j")
f = E("f")
i = F("i")
e = C("e")
k = A("k")
m = C("m")
g = F("g")

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: C = None
        self.z: C = None
        self.s: C = None
        self.u: E = None
        self.txt = txt

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

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

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

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

n = A("n")
h = B("h")
a = C("a")
j = D("j")
f = E("f")
i = F("i")
e = C("e")
k = A("k")
m = C("m")
g = F("g")

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