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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: C = None
        self.s: D = None
        self.y: B = None
        self.u: A = None
        self.w: E = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: A = None
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: F = None
        self.r: B = None
        self.u: G = None
        self.w: G = None
        self.t: D = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: C = None
        self.s: D = None
        self.y: B = None
        self.u: A = None
        self.w: E = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: A = None
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: F = None
        self.r: B = None
        self.u: G = None
        self.w: G = None
        self.t: D = None
        self.v: F = None
        self.txt = txt

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

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