class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: B = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: C = None
        self.s: A = None
        self.v: C = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: H = None
        self.r: A = None
        self.q: E = None
        self.x: H = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: I = None
        self.q: F = None
        self.v: A = None
        self.y: F = None
        self.s: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: D = None
        self.y: C = None
        self.p: I = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: G = None
        self.q: H = None
        self.r: B = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: C = None
        self.s: A = None
        self.v: C = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: H = None
        self.r: A = None
        self.q: E = None
        self.x: H = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: I = None
        self.q: F = None
        self.v: A = None
        self.y: F = None
        self.s: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: D = None
        self.y: C = None
        self.p: I = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: G = None
        self.q: H = None
        self.r: B = None
        self.y: C = None
        self.txt = txt

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

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