class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: B = None
        self.y: F = None
        self.o: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: G = None
        self.u: G = None
        self.x: C = None
        self.w: D = None
        self.r: B = None
        self.txt = txt

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

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

j = A("j")
n = B("n")
a = C("a")
h = D("h")
b = E("b")
i = F("i")
e = G("e")
m = G("m")
d = C("d")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: G = None
        self.u: G = None
        self.x: C = None
        self.w: D = None
        self.r: B = None
        self.txt = txt

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

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

j = A("j")
n = B("n")
a = C("a")
h = D("h")
b = E("b")
i = F("i")
e = G("e")
m = G("m")
d = C("d")

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