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

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: E = None
        self.p: G = None
        self.w: E = 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.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: G = None
        self.y: G = None
        self.s: A = None
        self.r: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: E = None
        self.p: G = None
        self.w: E = 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.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: G = None
        self.y: G = None
        self.s: A = None
        self.r: F = None
        self.txt = txt

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

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