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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.w: E = None
        self.o: J = None
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: J = None
        self.s: C = None
        self.x: B = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: I = None
        self.v: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.w: E = None
        self.o: J = None
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: J = None
        self.s: C = None
        self.x: B = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: I = None
        self.v: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: B = None
        self.txt = txt

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

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