class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: D = None
        self.w: C = None
        self.q: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: B = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: J = None
        self.u: F = None
        self.p: B = None
        self.s: G = None
        self.x: H = None
        self.z: F = None
        self.v: C = None
        self.o: G = None
        self.w: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.w: J = None
        self.t: A = None
        self.p: H = None
        self.u: D = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: B = None
        self.o: I = None
        self.p: B = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: J = None
        self.v: F = None
        self.t: C = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: B = None
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: B = None
        self.w: G = None
        self.z: C = None
        self.o: E = None
        self.q: D = None
        self.v: G = None
        self.y: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: B = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: J = None
        self.u: F = None
        self.p: B = None
        self.s: G = None
        self.x: H = None
        self.z: F = None
        self.v: C = None
        self.o: G = None
        self.w: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.w: J = None
        self.t: A = None
        self.p: H = None
        self.u: D = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: B = None
        self.o: I = None
        self.p: B = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: J = None
        self.v: F = None
        self.t: C = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: B = None
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: B = None
        self.w: G = None
        self.z: C = None
        self.o: E = None
        self.q: D = None
        self.v: G = None
        self.y: B = None
        self.txt = txt

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

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