class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: B = None
        self.v: E = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: A = None
        self.w: B = None
        self.y: C = None
        self.r: G = None
        self.o: G = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: A = None
        self.w: B = None
        self.y: C = None
        self.r: G = None
        self.o: G = None
        self.t: A = None
        self.txt = txt

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

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