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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: A = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: B = None
        self.v: I = None
        self.y: D = None
        self.q: C = None
        self.r: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: C = None
        self.u: D = None
        self.x: A = None
        self.y: A = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: G = None
        self.s: F = None
        self.t: H = None
        self.r: C = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: A = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: B = None
        self.v: I = None
        self.y: D = None
        self.q: C = None
        self.r: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: C = None
        self.u: D = None
        self.x: A = None
        self.y: A = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: G = None
        self.s: F = None
        self.t: H = None
        self.r: C = None
        self.w: D = None
        self.txt = txt

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

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