class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: B = None
        self.x: F = None
        self.u: B = None
        self.w: I = None
        self.z: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: E = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: E = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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