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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: D = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: D = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: G = None
        self.txt = txt

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

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

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

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