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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: A = None
        self.r: G = None
        self.y: H = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: G = None
        self.x: G = None
        self.v: D = None
        self.y: G = None
        self.u: G = None
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: B = None
        self.o: D = None
        self.w: D = None
        self.t: A = None
        self.x: I = None
        self.r: B = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: E = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: A = None
        self.y: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: A = None
        self.r: G = None
        self.y: H = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: G = None
        self.x: G = None
        self.v: D = None
        self.y: G = None
        self.u: G = None
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: B = None
        self.o: D = None
        self.w: D = None
        self.t: A = None
        self.x: I = None
        self.r: B = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: E = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: A = None
        self.y: A = None
        self.txt = txt

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

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

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