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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: A = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: C = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: A = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: C = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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