class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: D = None
        self.x: H = None
        self.y: E = None
        self.z: B = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: I = None
        self.o: B = None
        self.w: B = None
        self.r: C = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: I = None
        self.o: B = None
        self.w: B = None
        self.r: C = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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

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