class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: B = None
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: H = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: E = None
        self.x: G = None
        self.p: C = None
        self.o: I = None
        self.w: E = None
        self.s: E = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: I = None
        self.v: B = None
        self.w: A = None
        self.r: D = None
        self.s: B = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: G = None
        self.t: D = None
        self.s: A = None
        self.z: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: B = None
        self.v: F = None
        self.r: D = None
        self.q: E = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: D = None
        self.x: D = None
        self.s: E = None
        self.w: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: H = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: E = None
        self.x: G = None
        self.p: C = None
        self.o: I = None
        self.w: E = None
        self.s: E = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: I = None
        self.v: B = None
        self.w: A = None
        self.r: D = None
        self.s: B = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: G = None
        self.t: D = None
        self.s: A = None
        self.z: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: B = None
        self.v: F = None
        self.r: D = None
        self.q: E = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: D = None
        self.x: D = None
        self.s: E = None
        self.w: H = None
        self.txt = txt

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

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