class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: F = None
        self.r: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: H = None
        self.o: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: E = None
        self.w: H = None
        self.z: F = None
        self.u: B = None
        self.r: E = None
        self.y: I = None
        self.q: F = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: B = None
        self.v: D = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: F = None
        self.p: I = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: B = None
        self.p: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: H = None
        self.o: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: E = None
        self.w: H = None
        self.z: F = None
        self.u: B = None
        self.r: E = None
        self.y: I = None
        self.q: F = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: B = None
        self.v: D = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: F = None
        self.p: I = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: B = None
        self.p: C = None
        self.txt = txt

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

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