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

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: H = None
        self.o: C = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: D = None
        self.q: F = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: D = None
        self.x: E = None
        self.y: G = None
        self.v: B = None
        self.t: D = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: H = None
        self.o: C = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: D = None
        self.q: F = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: D = None
        self.x: E = None
        self.y: G = None
        self.v: B = None
        self.t: D = None
        self.z: D = None
        self.txt = txt

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

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