class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: H = None
        self.q: H = None
        self.x: H = None
        self.r: A = None
        self.u: I = None
        self.z: G = None
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: A = None
        self.q: I = None
        self.o: D = None
        self.z: E = None
        self.w: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: F = None
        self.p: A = None
        self.x: I = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: F = None
        self.z: B = None
        self.o: C = None
        self.x: F = None
        self.v: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: H = None
        self.q: H = None
        self.x: H = None
        self.r: A = None
        self.u: I = None
        self.z: G = None
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: A = None
        self.q: I = None
        self.o: D = None
        self.z: E = None
        self.w: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: F = None
        self.p: A = None
        self.x: I = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: F = None
        self.z: B = None
        self.o: C = None
        self.x: F = None
        self.v: E = None
        self.txt = txt

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

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