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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: E = None
        self.x: F = None
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: E = None
        self.v: F = None
        self.s: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: C = None
        self.t: E = None
        self.z: C = None
        self.w: B = None
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: E = None
        self.x: F = None
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: E = None
        self.v: F = None
        self.s: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: C = None
        self.t: E = None
        self.z: C = None
        self.w: B = None
        self.u: A = None
        self.txt = txt

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

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