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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: H = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: A = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: I = None
        self.r: B = None
        self.p: G = None
        self.x: G = None
        self.t: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: H = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: F = None
        self.u: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: H = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: A = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: I = None
        self.r: B = None
        self.p: G = None
        self.x: G = None
        self.t: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: H = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: F = None
        self.u: E = None
        self.txt = txt

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

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

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

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