class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: A = None
        self.w: G = None
        self.s: J = None
        self.p: F = None
        self.z: E = None
        self.v: I = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: H = None
        self.q: G = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: C = None
        self.y: E = None
        self.t: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: G = None
        self.x: B = None
        self.q: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: A = None
        self.w: G = None
        self.s: J = None
        self.p: F = None
        self.z: E = None
        self.v: I = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: H = None
        self.q: G = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: C = None
        self.y: E = None
        self.t: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: G = None
        self.x: B = None
        self.q: E = None
        self.txt = txt

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

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

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