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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: G = None
        self.p: D = None
        self.w: H = None
        self.t: A = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: I = None
        self.y: B = None
        self.x: H = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: C = None
        self.o: C = None
        self.p: F = None
        self.t: B = None
        self.r: A = None
        self.s: A = None
        self.q: F = None
        self.v: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: H = None
        self.v: D = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: A = None
        self.o: B = None
        self.q: I = None
        self.s: B = None
        self.p: I = None
        self.y: E = None
        self.w: D = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: D = None
        self.x: E = None
        self.p: G = None
        self.w: A = None
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: G = None
        self.p: D = None
        self.w: H = None
        self.t: A = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: I = None
        self.y: B = None
        self.x: H = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: C = None
        self.o: C = None
        self.p: F = None
        self.t: B = None
        self.r: A = None
        self.s: A = None
        self.q: F = None
        self.v: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: H = None
        self.v: D = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: A = None
        self.o: B = None
        self.q: I = None
        self.s: B = None
        self.p: I = None
        self.y: E = None
        self.w: D = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: D = None
        self.x: E = None
        self.p: G = None
        self.w: A = None
        self.o: B = None
        self.txt = txt

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

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