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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: B = None
        self.q: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: H = None
        self.o: D = None
        self.p: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: C = None
        self.u: F = None
        self.q: E = None
        self.r: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: B = None
        self.w: G = None
        self.q: B = None
        self.v: I = None
        self.y: G = None
        self.z: F = None
        self.txt = txt

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

l.t = c
l.q = c
l.w = a
l.u = a
l.z = a
l.s = h
l.p = g
l.o = j
l.x = b
l.v = n
a.u = l
a.z = b
a.t = d
a.s = m
g.z = j
g.u = a
g.q = m
n.y = b
j.p = d
j.w = h
d.r = j
d.y = h
d.o = n
d.p = c
b.v = l
h.s = j
h.q = j
h.x = g
h.u = d
h.r = a
m.p = g
m.r = a
m.u = a
c.s = a
c.u = a
c.q = a
c.w = b
c.y = b
c.v = m
c.z = d
assert n.y.v.o.p.y.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: J = None
        self.w: B = None
        self.q: J = None
        self.s: H = None
        self.p: C = None
        self.u: B = None
        self.o: E = None
        self.z: B = None
        self.x: G = None
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: B = None
        self.q: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: H = None
        self.o: D = None
        self.p: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: C = None
        self.u: F = None
        self.q: E = None
        self.r: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: B = None
        self.w: G = None
        self.q: B = None
        self.v: I = None
        self.y: G = None
        self.z: F = None
        self.txt = txt

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

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