class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: B = None
        self.z: B = None
        self.x: J = None
        self.r: I = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: A = None
        self.y: E = None
        self.t: B = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: J = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: H = None
        self.o: F = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: B = None
        self.t: A = None
        self.x: H = None
        self.o: G = None
        self.u: D = None
        self.y: A = None
        self.p: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: C = None
        self.z: C = None
        self.p: F = None
        self.u: J = None
        self.o: B = None
        self.q: B = None
        self.t: C = None
        self.s: G = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: E = None
        self.x: D = None
        self.z: B = None
        self.o: H = None
        self.w: D = None
        self.txt = txt

e = A("e")
g = B("g")
f = C("f")
k = D("k")
l = E("l")
m = F("m")
b = G("b")
c = H("c")
h = I("h")
i = J("i")

e.t = f
e.p = f
e.y = g
e.z = g
e.x = i
e.r = h
g.p = c
f.v = g
f.t = g
f.q = e
f.r = e
f.y = l
k.p = i
k.y = i
k.t = l
l.y = m
l.o = m
l.q = c
l.x = f
m.w = i
m.s = g
m.t = e
m.y = e
m.p = e
m.x = c
m.o = b
m.u = k
b.p = e
b.r = m
c.w = h
c.y = f
c.z = f
c.t = f
c.p = m
c.u = i
c.o = g
c.q = g
c.r = g
c.s = b
h.q = e
i.y = f
i.r = l
i.x = k
i.w = k
i.z = g
i.o = c
assert c.u.z.p.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: B = None
        self.z: B = None
        self.x: J = None
        self.r: I = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: A = None
        self.y: E = None
        self.t: B = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: J = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: H = None
        self.o: F = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: B = None
        self.t: A = None
        self.x: H = None
        self.o: G = None
        self.u: D = None
        self.y: A = None
        self.p: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: C = None
        self.z: C = None
        self.p: F = None
        self.u: J = None
        self.o: B = None
        self.q: B = None
        self.t: C = None
        self.s: G = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: E = None
        self.x: D = None
        self.z: B = None
        self.o: H = None
        self.w: D = None
        self.txt = txt

e = A("e")
g = B("g")
f = C("f")
k = D("k")
l = E("l")
m = F("m")
b = G("b")
c = H("c")
h = I("h")
i = J("i")

e.t = f
e.p = f
e.y = g
e.z = g
e.x = i
e.r = h
g.p = c
f.v = g
f.t = g
f.q = e
f.r = e
f.y = l
k.p = i
k.y = i
k.t = l
l.y = m
l.o = m
l.q = c
l.x = f
m.w = i
m.s = g
m.t = e
m.y = e
m.p = e
m.x = c
m.o = b
m.u = k
b.p = e
b.r = m
c.w = h
c.y = f
c.z = f
c.t = f
c.p = m
c.u = i
c.o = g
c.q = g
c.r = g
c.s = b
h.q = e
i.y = f
i.r = l
i.x = k
i.w = k
i.z = g
i.o = c
assert c.u.z.p.txt == "c"