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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: F = None
        self.t: A = None
        self.p: F = None
        self.s: A = None
        self.o: E = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: F = None
        self.t: A = None
        self.p: F = None
        self.s: A = None
        self.o: E = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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