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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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