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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: A = None
        self.t: D = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: G = None
        self.v: I = None
        self.o: I = None
        self.w: A = None
        self.q: A = None
        self.t: B = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: J = None
        self.v: F = None
        self.r: G = None
        self.x: J = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: E = None
        self.w: G = None
        self.s: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: A = None
        self.t: D = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: G = None
        self.v: I = None
        self.o: I = None
        self.w: A = None
        self.q: A = None
        self.t: B = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: J = None
        self.v: F = None
        self.r: G = None
        self.x: J = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: E = None
        self.w: G = None
        self.s: H = None
        self.txt = txt

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

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

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