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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: B = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: E = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: E = None
        self.u: G = None
        self.q: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: B = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: E = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: E = None
        self.u: G = None
        self.q: G = None
        self.txt = txt

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

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