class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: C = None
        self.r: G = None
        self.u: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: B = None
        self.s: F = None
        self.p: F = None
        self.z: E = None
        self.o: A = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: B = None
        self.s: F = None
        self.p: F = None
        self.z: E = None
        self.o: A = None
        self.u: E = None
        self.txt = txt

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

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

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