class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: I = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: H = None
        self.o: A = None
        self.s: A = None
        self.w: F = None
        self.x: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: I = None
        self.q: E = None
        self.t: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: D = None
        self.x: F = None
        self.u: F = None
        self.r: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.w: G = None
        self.o: F = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: B = None
        self.u: F = None
        self.r: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: B = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: H = None
        self.o: A = None
        self.s: A = None
        self.w: F = None
        self.x: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: I = None
        self.q: E = None
        self.t: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: D = None
        self.x: F = None
        self.u: F = None
        self.r: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.w: G = None
        self.o: F = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: B = None
        self.u: F = None
        self.r: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: B = None
        self.t: C = None
        self.txt = txt

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

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