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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: G = None
        self.z: G = None
        self.w: G = None
        self.txt = txt

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

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

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

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

a = A("a")
g = B("g")
c = C("c")
l = D("l")
i = E("i")
n = F("n")
j = G("j")
d = H("d")
b = F("b")

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: G = None
        self.z: G = None
        self.w: G = None
        self.txt = txt

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

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

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

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

a = A("a")
g = B("g")
c = C("c")
l = D("l")
i = E("i")
n = F("n")
j = G("j")
d = H("d")
b = F("b")

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