class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: H = None
        self.u: C = None
        self.o: E = None
        self.r: F = None
        self.z: D = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: G = None
        self.t: G = None
        self.r: F = None
        self.o: G = None
        self.x: D = None
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: E = None
        self.s: C = None
        self.x: C = None
        self.q: E = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: F = None
        self.u: H = None
        self.y: A = None
        self.t: C = None
        self.s: G = None
        self.w: G = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: H = None
        self.u: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: G = None
        self.t: G = None
        self.r: F = None
        self.o: G = None
        self.x: D = None
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: E = None
        self.s: C = None
        self.x: C = None
        self.q: E = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: F = None
        self.u: H = None
        self.y: A = None
        self.t: C = None
        self.s: G = None
        self.w: G = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: H = None
        self.u: E = None
        self.txt = txt

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

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

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