class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: A = None
        self.x: H = None
        self.y: A = None
        self.p: D = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: E = None
        self.v: F = None
        self.s: B = None
        self.r: A = None
        self.y: B = None
        self.z: A = None
        self.o: G = None
        self.p: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: F = None
        self.x: F = None
        self.y: E = None
        self.p: H = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: E = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: B = None
        self.y: G = None
        self.x: G = None
        self.v: G = None
        self.o: H = None
        self.s: B = None
        self.r: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: A = None
        self.x: H = None
        self.y: A = None
        self.p: D = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: E = None
        self.v: F = None
        self.s: B = None
        self.r: A = None
        self.y: B = None
        self.z: A = None
        self.o: G = None
        self.p: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: F = None
        self.x: F = None
        self.y: E = None
        self.p: H = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: E = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: B = None
        self.y: G = None
        self.x: G = None
        self.v: G = None
        self.o: H = None
        self.s: B = None
        self.r: C = None
        self.txt = txt

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

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