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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: A = None
        self.s: G = None
        self.t: D = None
        self.p: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: G = None
        self.s: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: A = None
        self.s: G = None
        self.t: D = None
        self.p: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: G = None
        self.s: G = None
        self.txt = txt

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

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