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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: G = None
        self.o: H = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: C = None
        self.u: H = None
        self.y: E = None
        self.z: A = None
        self.v: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: G = None
        self.o: H = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: C = None
        self.u: H = None
        self.y: E = None
        self.z: A = None
        self.v: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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