class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: F = None
        self.u: B = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: D = None
        self.z: F = None
        self.w: E = None
        self.v: C = None
        self.s: E = None
        self.p: J = None
        self.x: D = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: F = None
        self.s: H = None
        self.z: G = None
        self.p: G = None
        self.w: D = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: G = None
        self.v: A = None
        self.p: F = None
        self.t: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: D = None
        self.z: F = None
        self.w: E = None
        self.v: C = None
        self.s: E = None
        self.p: J = None
        self.x: D = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: F = None
        self.s: H = None
        self.z: G = None
        self.p: G = None
        self.w: D = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: G = None
        self.v: A = None
        self.p: F = None
        self.t: G = None
        self.txt = txt

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

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

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