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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: F = None
        self.t: A = None
        self.w: C = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: F = None
        self.t: A = None
        self.w: C = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

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

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