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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: B = None
        self.y: B = None
        self.v: A = None
        self.s: F = None
        self.x: B = None
        self.w: I = None
        self.o: I = None
        self.u: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: C = None
        self.o: E = None
        self.z: D = None
        self.w: G = None
        self.q: H = None
        self.u: E = None
        self.r: A = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: I = None
        self.o: F = None
        self.z: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

i = A("i")
l = B("l")
f = C("f")
d = D("d")
j = E("j")
h = F("h")
k = G("k")
m = H("m")
e = I("e")

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: B = None
        self.y: B = None
        self.v: A = None
        self.s: F = None
        self.x: B = None
        self.w: I = None
        self.o: I = None
        self.u: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: C = None
        self.o: E = None
        self.z: D = None
        self.w: G = None
        self.q: H = None
        self.u: E = None
        self.r: A = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: I = None
        self.o: F = None
        self.z: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

i = A("i")
l = B("l")
f = C("f")
d = D("d")
j = E("j")
h = F("h")
k = G("k")
m = H("m")
e = I("e")

i.x = l
i.v = l
i.t = l
i.w = l
i.u = j
i.y = m
i.z = d
i.p = d
i.o = k
l.u = j
f.r = k
f.q = l
f.y = l
f.x = l
f.u = l
f.v = i
f.s = h
f.w = e
f.o = e
d.s = f
d.y = f
d.q = f
d.t = e
d.v = e
d.p = k
d.o = k
d.x = k
d.u = m
j.r = d
j.x = i
j.w = h
h.v = d
h.z = d
h.x = f
h.o = j
h.u = j
h.w = k
h.q = m
h.r = i
h.s = i
k.p = h
k.o = h
k.q = e
k.z = m
m.r = l
e.w = i
assert m.r.u.x.txt == "i"