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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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

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

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

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