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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: C = None
        self.r: B = None
        self.p: C = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: C = None
        self.r: B = None
        self.p: C = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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