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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: A = None
        self.z: C = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: A = None
        self.u: D = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: I = None
        self.r: D = None
        self.u: H = None
        self.x: I = None
        self.p: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: A = None
        self.z: C = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: A = None
        self.u: D = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: I = None
        self.r: D = None
        self.u: H = None
        self.x: I = None
        self.p: F = None
        self.txt = txt

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

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