class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: I = None
        self.p: B = None
        self.y: E = None
        self.q: D = None
        self.t: G = None
        self.r: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: A = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: G = None
        self.t: D = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: F = None
        self.u: D = None
        self.v: F = None
        self.z: F = None
        self.o: F = None
        self.r: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: E = None
        self.v: G = None
        self.y: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: A = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: G = None
        self.t: D = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: F = None
        self.u: D = None
        self.v: F = None
        self.z: F = None
        self.o: F = None
        self.r: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: E = None
        self.v: G = None
        self.y: H = None
        self.txt = txt

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

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