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

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: G = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: E = None
        self.r: C = None
        self.s: A = None
        self.v: F = None
        self.y: C = None
        self.x: F = None
        self.w: C = None
        self.txt = txt

g = A("g")
c = B("c")
m = C("m")
l = D("l")
k = E("k")
n = F("n")
a = G("a")
j = H("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: G = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: E = None
        self.r: C = None
        self.s: A = None
        self.v: F = None
        self.y: C = None
        self.x: F = None
        self.w: C = None
        self.txt = txt

g = A("g")
c = B("c")
m = C("m")
l = D("l")
k = E("k")
n = F("n")
a = G("a")
j = H("j")

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