class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: C = None
        self.w: C = None
        self.x: F = None
        self.u: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: I = None
        self.o: E = None
        self.t: E = None
        self.u: H = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: B = None
        self.u: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: B = None
        self.s: I = None
        self.t: J = None
        self.x: E = None
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: B = None
        self.t: F = None
        self.r: C = None
        self.s: I = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: C = None
        self.z: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: I = None
        self.o: E = None
        self.t: E = None
        self.u: H = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: B = None
        self.u: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: B = None
        self.s: I = None
        self.t: J = None
        self.x: E = None
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: B = None
        self.t: F = None
        self.r: C = None
        self.s: I = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: C = None
        self.z: I = None
        self.txt = txt

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

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