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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

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