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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: D = None
        self.q: A = None
        self.u: E = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: G = None
        self.p: A = None
        self.o: I = None
        self.t: A = None
        self.y: D = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: H = None
        self.q: G = None
        self.v: A = None
        self.u: B = None
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.q: A = None
        self.o: C = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: D = None
        self.u: J = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: D = None
        self.q: A = None
        self.u: E = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: G = None
        self.p: A = None
        self.o: I = None
        self.t: A = None
        self.y: D = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: H = None
        self.q: G = None
        self.v: A = None
        self.u: B = None
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.q: A = None
        self.o: C = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: D = None
        self.u: J = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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