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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: D = None
        self.p: G = None
        self.r: F = None
        self.t: D = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: E = None
        self.p: E = None
        self.w: B = None
        self.o: C = None
        self.t: B = None
        self.txt = txt

i = A("i")
h = B("h")
c = C("c")
n = D("n")
j = E("j")
l = F("l")
b = G("b")
e = D("e")
k = C("k")
a = E("a")

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: D = None
        self.p: G = None
        self.r: F = None
        self.t: D = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: E = None
        self.p: E = None
        self.w: B = None
        self.o: C = None
        self.t: B = None
        self.txt = txt

i = A("i")
h = B("h")
c = C("c")
n = D("n")
j = E("j")
l = F("l")
b = G("b")
e = D("e")
k = C("k")
a = E("a")

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