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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: A = None
        self.y: F = None
        self.x: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: C = None
        self.z: A = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: I = None
        self.r: H = None
        self.s: D = None
        self.y: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: C = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: G = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: A = None
        self.y: F = None
        self.x: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: C = None
        self.z: A = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: I = None
        self.r: H = None
        self.s: D = None
        self.y: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: C = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: G = None
        self.q: B = None
        self.txt = txt

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

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