class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: A = None
        self.r: C = None
        self.p: D = None
        self.y: F = None
        self.o: H = None
        self.s: A = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: C = None
        self.t: H = None
        self.z: D = None
        self.v: B = None
        self.w: D = None
        self.o: C = None
        self.r: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: E = None
        self.q: D = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: H = None
        self.w: A = None
        self.txt = txt

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

g = A("g")
h = B("h")
f = C("f")
c = D("c")
m = E("m")
d = F("d")
j = G("j")
i = H("i")
l = C("l")
n = D("n")

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

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

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: A = None
        self.r: C = None
        self.p: D = None
        self.y: F = None
        self.o: H = None
        self.s: A = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: C = None
        self.t: H = None
        self.z: D = None
        self.v: B = None
        self.w: D = None
        self.o: C = None
        self.r: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: E = None
        self.q: D = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: H = None
        self.w: A = None
        self.txt = txt

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

g = A("g")
h = B("h")
f = C("f")
c = D("c")
m = E("m")
d = F("d")
j = G("j")
i = H("i")
l = C("l")
n = D("n")

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