class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: H = None
        self.r: B = None
        self.q: G = None
        self.x: D = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: C = None
        self.s: I = None
        self.x: D = None
        self.u: B = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: E = None
        self.y: E = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: C = None
        self.s: I = None
        self.x: D = None
        self.u: B = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: E = None
        self.y: E = None
        self.p: H = None
        self.txt = txt

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

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

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