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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: H = None
        self.z: F = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: A = None
        self.r: E = None
        self.z: H = None
        self.o: I = None
        self.p: G = None
        self.q: E = None
        self.w: 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.w: I = None
        self.t: D = None
        self.y: J = None
        self.p: C = None
        self.q: C = None
        self.o: C = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: H = None
        self.z: F = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: A = None
        self.r: E = None
        self.z: H = None
        self.o: I = None
        self.p: G = None
        self.q: E = None
        self.w: 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.w: I = None
        self.t: D = None
        self.y: J = None
        self.p: C = None
        self.q: C = None
        self.o: C = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: B = None
        self.txt = txt

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

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

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