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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: B = None
        self.y: C = None
        self.x: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: B = None
        self.y: C = None
        self.x: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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