class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: B = None
        self.y: G = None
        self.q: G = None
        self.v: C = None
        self.t: B = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: F = None
        self.r: H = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: A = None
        self.w: A = None
        self.u: A = None
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: F = None
        self.r: H = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: A = None
        self.w: A = None
        self.u: A = None
        self.o: G = None
        self.txt = txt

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

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