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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: I = None
        self.y: B = None
        self.s: I = None
        self.t: G = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: F = None
        self.r: I = None
        self.w: I = None
        self.u: C = None
        self.t: C = None
        self.y: D = None
        self.o: F = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: I = None
        self.y: B = None
        self.s: I = None
        self.t: G = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: F = None
        self.r: I = None
        self.w: I = None
        self.u: C = None
        self.t: C = None
        self.y: D = None
        self.o: F = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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