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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: E = None
        self.w: F = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: E = None
        self.r: F = None
        self.y: B = None
        self.t: H = None
        self.o: B = None
        self.s: I = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.y: C = None
        self.u: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: E = None
        self.w: F = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: E = None
        self.r: F = None
        self.y: B = None
        self.t: H = None
        self.o: B = None
        self.s: I = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.y: C = None
        self.u: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: G = None
        self.txt = txt

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

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

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