class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: B = None
        self.x: J = None
        self.z: D = None
        self.o: B = None
        self.q: E = None
        self.w: B = None
        self.u: B = None
        self.p: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: A = None
        self.txt = txt

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

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

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