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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: G = None
        self.r: A = None
        self.o: F = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: A = None
        self.r: I = None
        self.x: F = None
        self.y: A = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: I = None
        self.u: B = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: C = None
        self.o: I = None
        self.s: E = None
        self.r: D = None
        self.w: G = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: C = None
        self.v: C = None
        self.z: F = None
        self.t: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: E = None
        self.v: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: G = None
        self.r: A = None
        self.o: F = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: A = None
        self.r: I = None
        self.x: F = None
        self.y: A = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: I = None
        self.u: B = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: C = None
        self.o: I = None
        self.s: E = None
        self.r: D = None
        self.w: G = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: C = None
        self.v: C = None
        self.z: F = None
        self.t: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: E = None
        self.v: D = None
        self.txt = txt

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

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