class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: B = None
        self.u: D = None
        self.o: C = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: B = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: A = None
        self.u: A = None
        self.w: I = None
        self.y: E = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: G = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: D = None
        self.q: C = None
        self.r: H = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: B = None
        self.u: D = None
        self.o: C = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: B = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: A = None
        self.u: A = None
        self.w: I = None
        self.y: E = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: G = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: D = None
        self.q: C = None
        self.r: H = None
        self.u: E = None
        self.txt = txt

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

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