class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: A = None
        self.y: B = None
        self.z: D = None
        self.w: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: A = None
        self.x: H = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: E = None
        self.q: H = None
        self.s: E = None
        self.v: G = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: C = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: E = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: A = None
        self.x: E = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: C = None
        self.r: A = None
        self.v: G = None
        self.u: A = None
        self.y: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: A = None
        self.x: H = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: E = None
        self.q: H = None
        self.s: E = None
        self.v: G = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: C = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: E = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: A = None
        self.x: E = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: C = None
        self.r: A = None
        self.v: G = None
        self.u: A = None
        self.y: A = None
        self.txt = txt

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

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