class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: C = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: I = None
        self.z: E = None
        self.w: D = None
        self.q: J = None
        self.s: G = None
        self.x: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: C = None
        self.v: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: I = None
        self.z: E = None
        self.w: D = None
        self.q: J = None
        self.s: G = None
        self.x: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: C = None
        self.v: J = None
        self.txt = txt

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

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

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