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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: C = None
        self.s: D = None
        self.o: D = None
        self.v: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: J = None
        self.x: A = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: D = None
        self.o: B = None
        self.z: B = None
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: C = None
        self.v: B = None
        self.z: B = None
        self.p: D = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: C = None
        self.s: D = None
        self.o: D = None
        self.v: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: J = None
        self.x: A = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: D = None
        self.o: B = None
        self.z: B = None
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: C = None
        self.v: B = None
        self.z: B = None
        self.p: D = None
        self.r: D = None
        self.txt = txt

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

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