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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: A = None
        self.x: C = None
        self.u: A = None
        self.y: A = None
        self.s: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: E = None
        self.y: G = None
        self.v: C = None
        self.o: B = None
        self.txt = txt

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

e = A("e")
k = B("k")
h = C("h")
m = D("m")
l = E("l")
c = F("c")
b = G("b")
i = C("i")
a = E("a")

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: A = None
        self.x: C = None
        self.u: A = None
        self.y: A = None
        self.s: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: E = None
        self.y: G = None
        self.v: C = None
        self.o: B = None
        self.txt = txt

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

e = A("e")
k = B("k")
h = C("h")
m = D("m")
l = E("l")
c = F("c")
b = G("b")
i = C("i")
a = E("a")

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