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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: A = None
        self.v: F = None
        self.z: F = None
        self.q: E = None
        self.t: A = None
        self.w: A = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: A = None
        self.u: D = None
        self.z: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: A = None
        self.x: A = None
        self.r: B = None
        self.q: A = None
        self.w: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: A = None
        self.v: F = None
        self.z: F = None
        self.q: E = None
        self.t: A = None
        self.w: A = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: A = None
        self.u: D = None
        self.z: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: A = None
        self.x: A = None
        self.r: B = None
        self.q: A = None
        self.w: B = None
        self.txt = txt

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

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

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