class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: G = None
        self.r: E = None
        self.q: E = None
        self.o: B = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: G = None
        self.r: G = None
        self.t: G = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: G = None
        self.r: G = None
        self.t: G = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: E = None
        self.w: E = None
        self.txt = txt

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

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