class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: B = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: H = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: A = None
        self.q: H = None
        self.x: D = None
        self.u: H = None
        self.o: C = None
        self.z: C = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: F = None
        self.z: G = None
        self.p: C = None
        self.r: B = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: H = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: A = None
        self.q: H = None
        self.x: D = None
        self.u: H = None
        self.o: C = None
        self.z: C = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: F = None
        self.z: G = None
        self.p: C = None
        self.r: B = None
        self.s: A = None
        self.txt = txt

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

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