class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: E = None
        self.o: H = None
        self.q: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: H = None
        self.q: B = None
        self.w: H = None
        self.x: C = None
        self.v: G = None
        self.r: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: D = None
        self.t: D = None
        self.q: F = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: H = None
        self.q: B = None
        self.w: H = None
        self.x: C = None
        self.v: G = None
        self.r: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: D = None
        self.t: D = None
        self.q: F = None
        self.y: C = None
        self.txt = txt

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

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