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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: G = None
        self.x: G = None
        self.v: I = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: A = None
        self.w: F = None
        self.t: I = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: A = None
        self.p: B = None
        self.z: C = None
        self.y: H = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.z: B = None
        self.r: D = None
        self.x: H = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: F = None
        self.t: A = None
        self.p: G = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: G = None
        self.x: G = None
        self.v: I = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: A = None
        self.w: F = None
        self.t: I = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: A = None
        self.p: B = None
        self.z: C = None
        self.y: H = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.z: B = None
        self.r: D = None
        self.x: H = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: F = None
        self.t: A = None
        self.p: G = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: E = None
        self.txt = txt

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

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