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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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