class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: D = None
        self.v: H = None
        self.s: G = None
        self.x: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: E = None
        self.s: I = None
        self.t: F = None
        self.y: A = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: C = None
        self.w: D = None
        self.t: C = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: H = None
        self.q: B = None
        self.u: B = None
        self.z: E = None
        self.o: D = None
        self.y: A = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: F = None
        self.z: F = None
        self.x: C = None
        self.w: I = None
        self.u: I = None
        self.v: G = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: E = None
        self.s: I = None
        self.t: F = None
        self.y: A = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: C = None
        self.w: D = None
        self.t: C = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: H = None
        self.q: B = None
        self.u: B = None
        self.z: E = None
        self.o: D = None
        self.y: A = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: F = None
        self.z: F = None
        self.x: C = None
        self.w: I = None
        self.u: I = None
        self.v: G = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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