class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: G = None
        self.q: C = None
        self.y: H = None
        self.u: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: H = None
        self.z: H = None
        self.w: I = None
        self.t: E = None
        self.r: B = None
        self.x: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: B = None
        self.w: H = None
        self.s: C = None
        self.v: I = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: D = None
        self.p: I = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: H = None
        self.z: H = None
        self.w: I = None
        self.t: E = None
        self.r: B = None
        self.x: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: B = None
        self.w: H = None
        self.s: C = None
        self.v: I = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: D = None
        self.p: I = None
        self.txt = txt

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

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

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