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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: H = None
        self.s: G = None
        self.u: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: H = None
        self.q: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: F = None
        self.r: A = None
        self.s: F = None
        self.w: A = None
        self.y: G = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: H = None
        self.s: G = None
        self.u: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: H = None
        self.q: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: F = None
        self.r: A = None
        self.s: F = None
        self.w: A = None
        self.y: G = None
        self.v: A = None
        self.txt = txt

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

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