class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: C = None
        self.p: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: I = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.s: J = None
        self.o: A = None
        self.u: D = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: C = None
        self.y: A = None
        self.z: I = None
        self.t: E = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: I = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.s: J = None
        self.o: A = None
        self.u: D = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: C = None
        self.y: A = None
        self.z: I = None
        self.t: E = None
        self.p: D = None
        self.txt = txt

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

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

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

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