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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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