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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: E = None
        self.x: E = None
        self.u: E = None
        self.p: B = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: F = None
        self.p: J = None
        self.t: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: G = None
        self.r: J = None
        self.x: B = None
        self.u: A = None
        self.w: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: A = None
        self.u: A = None
        self.o: B = None
        self.txt = txt

d = A("d")
g = B("g")
h = C("h")
k = D("k")
j = E("j")
a = F("a")
c = G("c")
e = H("e")
b = I("b")
i = J("i")

d.x = a
d.p = a
d.r = h
d.v = h
d.y = h
d.s = i
d.u = g
d.q = g
d.o = e
d.t = e
g.s = a
h.q = c
h.p = c
h.v = e
k.s = j
k.v = e
k.w = h
k.x = h
k.o = c
k.z = a
j.v = i
a.t = g
a.p = g
a.w = j
a.x = j
a.u = j
a.s = e
c.q = j
c.r = a
c.p = i
c.t = g
e.y = b
e.q = j
e.x = a
e.z = d
e.t = c
e.w = c
e.p = k
b.v = g
b.x = g
b.o = c
b.r = i
b.u = d
b.w = a
i.y = c
i.r = d
i.u = d
i.o = g
assert h.p.t.s.s.z.x.x.v.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: C = None
        self.v: C = None
        self.s: J = None
        self.p: F = None
        self.y: C = None
        self.u: B = None
        self.q: B = None
        self.o: H = None
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: E = None
        self.x: E = None
        self.u: E = None
        self.p: B = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: F = None
        self.p: J = None
        self.t: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: G = None
        self.r: J = None
        self.x: B = None
        self.u: A = None
        self.w: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: A = None
        self.u: A = None
        self.o: B = None
        self.txt = txt

d = A("d")
g = B("g")
h = C("h")
k = D("k")
j = E("j")
a = F("a")
c = G("c")
e = H("e")
b = I("b")
i = J("i")

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