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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: F = None
        self.o: B = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: F = None
        self.z: G = None
        self.r: F = None
        self.x: G = None
        self.u: A = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: A = None
        self.t: E = None
        self.o: D = None
        self.q: F = None
        self.x: G = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: B = None
        self.y: A = None
        self.v: B = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: F = None
        self.o: B = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: F = None
        self.z: G = None
        self.r: F = None
        self.x: G = None
        self.u: A = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: A = None
        self.t: E = None
        self.o: D = None
        self.q: F = None
        self.x: G = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: B = None
        self.y: A = None
        self.v: B = None
        self.p: B = None
        self.txt = txt

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

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