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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: B = None
        self.v: C = None
        self.q: I = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: B = None
        self.w: D = None
        self.s: C = None
        self.o: C = None
        self.p: A = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: G = None
        self.s: E = None
        self.v: B = None
        self.t: A = None
        self.x: B = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: D = None
        self.r: C = None
        self.w: C = None
        self.t: F = None
        self.u: H = None
        self.v: D = None
        self.x: D = None
        self.o: A = None
        self.txt = txt

i = A("i")
h = B("h")
f = C("f")
d = D("d")
n = E("n")
e = F("e")
g = G("g")
b = H("b")
m = I("m")
j = D("j")

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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: B = None
        self.v: C = None
        self.q: I = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: B = None
        self.w: D = None
        self.s: C = None
        self.o: C = None
        self.p: A = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: G = None
        self.s: E = None
        self.v: B = None
        self.t: A = None
        self.x: B = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: D = None
        self.r: C = None
        self.w: C = None
        self.t: F = None
        self.u: H = None
        self.v: D = None
        self.x: D = None
        self.o: A = None
        self.txt = txt

i = A("i")
h = B("h")
f = C("f")
d = D("d")
n = E("n")
e = F("e")
g = G("g")
b = H("b")
m = I("m")
j = D("j")

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