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

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: G = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: D = None
        self.z: F = None
        self.v: B = None
        self.p: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: A = None
        self.u: H = None
        self.r: F = None
        self.q: H = None
        self.p: F = None
        self.z: E = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: F = None
        self.u: B = None
        self.v: D = None
        self.z: D = None
        self.t: G = None
        self.x: F = None
        self.o: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: G = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: D = None
        self.z: F = None
        self.v: B = None
        self.p: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: A = None
        self.u: H = None
        self.r: F = None
        self.q: H = None
        self.p: F = None
        self.z: E = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: F = None
        self.u: B = None
        self.v: D = None
        self.z: D = None
        self.t: G = None
        self.x: F = None
        self.o: A = None
        self.txt = txt

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

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