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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: D = None
        self.y: G = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: D = None
        self.txt = txt

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

g = A("g")
e = B("e")
c = C("c")
k = D("k")
m = E("m")
f = F("f")
j = G("j")
a = H("a")
h = H("h")

g.u = m
g.y = h
g.s = h
g.x = h
g.p = a
g.w = e
g.q = e
e.r = f
e.u = a
e.y = k
e.s = j
c.z = e
c.r = e
c.v = k
c.y = j
k.x = h
k.v = m
m.v = h
m.w = j
f.s = h
f.x = c
j.s = c
j.y = k
a.s = f
a.r = k
a.w = k
a.p = e
a.z = h
h.s = f
h.r = k
h.w = k
h.p = e
h.z = a
assert h.s.x.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: H = None
        self.s: H = None
        self.p: H = None
        self.w: B = None
        self.q: B = None
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: D = None
        self.y: G = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: D = None
        self.txt = txt

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

g = A("g")
e = B("e")
c = C("c")
k = D("k")
m = E("m")
f = F("f")
j = G("j")
a = H("a")
h = H("h")

g.u = m
g.y = h
g.s = h
g.x = h
g.p = a
g.w = e
g.q = e
e.r = f
e.u = a
e.y = k
e.s = j
c.z = e
c.r = e
c.v = k
c.y = j
k.x = h
k.v = m
m.v = h
m.w = j
f.s = h
f.x = c
j.s = c
j.y = k
a.s = f
a.r = k
a.w = k
a.p = e
a.z = h
h.s = f
h.r = k
h.w = k
h.p = e
h.z = a
assert h.s.x.v.x.txt == "h"