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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: A = None
        self.x: D = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: A = None
        self.u: D = None
        self.y: B = None
        self.p: D = None
        self.w: B = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: A = None
        self.x: D = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: A = None
        self.u: D = None
        self.y: B = None
        self.p: D = None
        self.w: B = None
        self.t: A = None
        self.txt = txt

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

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

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