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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: F = None
        self.p: A = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: H = None
        self.q: F = None
        self.t: D = None
        self.r: D = None
        self.x: B = None
        self.v: F = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

c = A("c")
i = B("i")
d = C("d")
l = D("l")
n = E("n")
g = F("g")
m = G("m")
e = H("e")

c.s = m
i.s = c
i.y = n
i.w = g
i.t = g
i.x = g
i.z = m
i.r = e
d.z = l
d.q = g
d.w = g
d.p = c
l.p = e
l.o = g
n.w = m
n.r = m
n.s = m
n.o = d
n.z = i
n.p = l
n.x = g
g.q = d
g.v = n
g.r = n
g.p = m
m.o = g
m.q = g
m.v = g
m.w = e
m.t = l
m.r = l
m.u = l
m.x = i
e.o = i
assert g.q.w.p.u.p.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: F = None
        self.p: A = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: H = None
        self.q: F = None
        self.t: D = None
        self.r: D = None
        self.x: B = None
        self.v: F = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

c = A("c")
i = B("i")
d = C("d")
l = D("l")
n = E("n")
g = F("g")
m = G("m")
e = H("e")

c.s = m
i.s = c
i.y = n
i.w = g
i.t = g
i.x = g
i.z = m
i.r = e
d.z = l
d.q = g
d.w = g
d.p = c
l.p = e
l.o = g
n.w = m
n.r = m
n.s = m
n.o = d
n.z = i
n.p = l
n.x = g
g.q = d
g.v = n
g.r = n
g.p = m
m.o = g
m.q = g
m.v = g
m.w = e
m.t = l
m.r = l
m.u = l
m.x = i
e.o = i
assert g.q.w.p.u.p.o.s.txt == "c"