class A:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: C = None
        self.y: E = None
        self.z: A = None
        self.v: F = None
        self.q: B = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: F = None
        self.t: D = None
        self.s: F = None
        self.q: F = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: F = None
        self.q: G = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: F = None
        self.t: D = None
        self.s: F = None
        self.q: F = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: F = None
        self.q: G = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: A = None
        self.txt = txt

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

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