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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: C = None
        self.y: I = None
        self.t: I = None
        self.v: H = None
        self.o: F = None
        self.u: G = None
        self.w: F = None
        self.p: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: J = None
        self.y: A = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: E = None
        self.w: E = None
        self.q: C = None
        self.t: C = None
        self.o: I = None
        self.x: C = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: I = None
        self.u: A = None
        self.txt = txt

l = A("l")
n = B("n")
a = C("a")
f = D("f")
g = E("g")
m = F("m")
j = G("j")
d = H("d")
b = I("b")
c = J("c")

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: C = None
        self.y: I = None
        self.t: I = None
        self.v: H = None
        self.o: F = None
        self.u: G = None
        self.w: F = None
        self.p: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: J = None
        self.y: A = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: E = None
        self.w: E = None
        self.q: C = None
        self.t: C = None
        self.o: I = None
        self.x: C = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: I = None
        self.u: A = None
        self.txt = txt

l = A("l")
n = B("n")
a = C("a")
f = D("f")
g = E("g")
m = F("m")
j = G("j")
d = H("d")
b = I("b")
c = J("c")

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