class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: B = None
        self.v: E = None
        self.z: H = None
        self.q: B = None
        self.s: B = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: E = None
        self.r: G = None
        self.y: G = None
        self.u: F = None
        self.q: E = None
        self.o: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: D = None
        self.v: C = None
        self.t: G = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: H = None
        self.r: D = None
        self.s: H = None
        self.t: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: E = None
        self.r: G = None
        self.y: G = None
        self.u: F = None
        self.q: E = None
        self.o: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: D = None
        self.v: C = None
        self.t: G = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: H = None
        self.r: D = None
        self.s: H = None
        self.t: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: D = None
        self.txt = txt

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

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