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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: D = None
        self.w: E = None
        self.r: G = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: A = None
        self.o: G = None
        self.r: G = None
        self.w: G = None
        self.z: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: J = None
        self.x: G = None
        self.v: G = None
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: C = None
        self.u: G = None
        self.p: F = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: D = None
        self.w: E = None
        self.r: G = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: A = None
        self.o: G = None
        self.r: G = None
        self.w: G = None
        self.z: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: J = None
        self.x: G = None
        self.v: G = None
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: C = None
        self.u: G = None
        self.p: F = None
        self.q: C = None
        self.txt = txt

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

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

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

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