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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: C = None
        self.txt = txt

c = A("c")
n = B("n")
k = C("k")
i = D("i")
b = E("b")
d = F("d")
l = G("l")
a = G("a")
h = A("h")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: C = None
        self.txt = txt

c = A("c")
n = B("n")
k = C("k")
i = D("i")
b = E("b")
d = F("d")
l = G("l")
a = G("a")
h = A("h")

c.s = l
c.o = b
c.v = b
c.y = a
c.q = a
c.t = i
c.w = d
n.s = h
k.q = a
k.p = a
k.t = b
k.u = i
k.o = h
k.s = h
i.t = h
i.r = b
i.v = n
b.r = n
b.u = c
d.x = b
d.q = i
l.p = d
l.s = k
a.p = d
a.s = k
h.s = a
h.y = a
h.q = a
h.o = b
h.v = b
h.t = i
h.w = d
assert d.x.r.s.y.s.u.r.r.txt == "n"