class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: D = None
        self.x: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: B = None
        self.t: G = None
        self.r: G = None
        self.w: G = None
        self.o: D = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: A = None
        self.w: C = None
        self.s: D = None
        self.p: F = None
        self.q: I = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: H = None
        self.q: H = None
        self.r: B = None
        self.u: H = None
        self.s: G = None
        self.y: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: B = None
        self.t: G = None
        self.r: G = None
        self.w: G = None
        self.o: D = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: A = None
        self.w: C = None
        self.s: D = None
        self.p: F = None
        self.q: I = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: H = None
        self.q: H = None
        self.r: B = None
        self.u: H = None
        self.s: G = None
        self.y: H = None
        self.txt = txt

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

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