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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: F = None
        self.t: G = None
        self.z: B = None
        self.y: B = None
        self.p: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: B = None
        self.q: G = None
        self.txt = txt

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

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

d = A("d")
g = B("g")
m = C("m")
f = D("f")
j = E("j")
c = F("c")
a = G("a")
b = A("b")
i = B("i")
k = G("k")

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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: F = None
        self.t: G = None
        self.z: B = None
        self.y: B = None
        self.p: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: B = None
        self.q: G = None
        self.txt = txt

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

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

d = A("d")
g = B("g")
m = C("m")
f = D("f")
j = E("j")
c = F("c")
a = G("a")
b = A("b")
i = B("i")
k = G("k")

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