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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: B = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: C = None
        self.y: G = None
        self.p: B = None
        self.o: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: D = None
        self.y: G = None
        self.txt = txt

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

j.w = g
j.q = f
g.r = h
g.o = k
g.u = k
g.x = k
g.w = j
g.q = e
m.y = a
m.t = g
m.u = i
a.w = j
a.v = m
a.y = h
a.o = h
a.p = g
k.v = b
i.v = h
h.w = m
h.s = m
h.r = m
h.t = k
h.x = k
h.o = g
h.p = e
b.w = j
b.x = a
b.y = h
f.r = h
f.o = k
f.u = k
f.x = k
f.w = j
f.q = e
e.v = h
assert j.w.r.r.u.v.r.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: B = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: C = None
        self.y: G = None
        self.p: B = None
        self.o: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: D = None
        self.y: G = None
        self.txt = txt

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

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