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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: D = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: I = None
        self.x: C = None
        self.w: I = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: A = None
        self.q: I = None
        self.x: B = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: B = None
        self.s: F = None
        self.q: G = None
        self.v: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: D = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: I = None
        self.x: C = None
        self.w: I = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: A = None
        self.q: I = None
        self.x: B = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: B = None
        self.s: F = None
        self.q: G = None
        self.v: G = None
        self.txt = txt

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

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