class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: G = None
        self.p: B = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: I = None
        self.t: H = None
        self.r: G = None
        self.q: I = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: I = None
        self.t: H = None
        self.r: G = None
        self.q: I = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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