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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: I = None
        self.q: A = None
        self.s: A = None
        self.w: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: H = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: A = None
        self.q: A = None
        self.p: E = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: D = None
        self.t: C = None
        self.w: D = None
        self.z: E = None
        self.o: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: I = None
        self.q: A = None
        self.s: A = None
        self.w: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: H = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: A = None
        self.q: A = None
        self.p: E = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: D = None
        self.t: C = None
        self.w: D = None
        self.z: E = None
        self.o: H = None
        self.txt = txt

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

e.t = n
i.v = e
i.u = b
f.q = e
g.u = b
g.z = n
g.q = e
g.s = e
g.w = l
l.s = e
l.r = e
l.v = g
l.z = j
l.p = f
l.t = f
l.o = n
l.q = i
l.y = i
b.q = f
j.z = g
j.u = c
j.t = i
c.s = e
c.u = e
c.q = e
c.r = e
c.p = l
n.v = e
n.p = g
n.w = g
n.t = f
n.z = l
n.o = c
assert c.q.t.z.r.txt == "e"