class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: E = None
        self.q: H = None
        self.v: B = None
        self.s: G = None
        self.z: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: D = None
        self.z: B = None
        self.v: I = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: I = None
        self.y: C = None
        self.z: C = None
        self.x: G = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: D = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: B = None
        self.s: E = None
        self.z: G = None
        self.o: B = None
        self.txt = txt

c = A("c")
f = B("f")
i = C("i")
m = D("m")
e = E("e")
n = F("n")
a = G("a")
j = H("j")
g = I("g")
k = F("k")

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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: D = None
        self.z: B = None
        self.v: I = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: I = None
        self.y: C = None
        self.z: C = None
        self.x: G = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: D = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: B = None
        self.s: E = None
        self.z: G = None
        self.o: B = None
        self.txt = txt

c = A("c")
f = B("f")
i = C("i")
m = D("m")
e = E("e")
n = F("n")
a = G("a")
j = H("j")
g = I("g")
k = F("k")

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