class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: J = None
        self.v: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: J = None
        self.x: H = None
        self.r: A = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: B = None
        self.o: D = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: E = None
        self.t: J = None
        self.u: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: I = None
        self.p: I = None
        self.t: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: C = None
        self.x: G = None
        self.v: E = None
        self.z: G = None
        self.p: D = None
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: J = None
        self.x: H = None
        self.r: A = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: B = None
        self.o: D = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: E = None
        self.t: J = None
        self.u: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: I = None
        self.p: I = None
        self.t: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: C = None
        self.x: G = None
        self.v: E = None
        self.z: G = None
        self.p: D = None
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: F = None
        self.txt = txt

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

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