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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: G = None
        self.y: C = None
        self.u: E = None
        self.s: A = None
        self.t: C = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: G = None
        self.x: C = None
        self.o: E = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: G = None
        self.y: C = None
        self.u: E = None
        self.s: A = None
        self.t: C = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: G = None
        self.x: C = None
        self.o: E = None
        self.s: F = None
        self.txt = txt

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

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