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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: H = None
        self.z: C = None
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: F = None
        self.z: B = None
        self.w: H = None
        self.s: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: H = None
        self.z: C = None
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: F = None
        self.z: B = None
        self.w: H = None
        self.s: C = None
        self.txt = txt

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

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