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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: E = None
        self.u: D = None
        self.y: F = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: B = None
        self.u: B = None
        self.v: F = None
        self.y: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: E = None
        self.y: A = None
        self.v: I = None
        self.u: I = None
        self.o: A = None
        self.p: C = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: C = None
        self.u: C = None
        self.p: F = None
        self.r: E = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

a.o = j
a.x = d
a.y = f
a.p = c
h.t = f
h.p = d
h.u = l
h.y = i
h.v = a
k.t = h
k.v = d
l.q = i
l.v = i
l.w = h
l.u = h
l.y = h
d.r = i
d.y = k
i.u = f
f.z = c
f.v = c
f.u = c
f.t = d
f.x = d
f.y = a
f.o = a
f.p = k
j.q = k
j.t = k
j.u = k
j.p = i
j.r = d
j.z = l
c.t = a
assert h.p.r.u.t.r.u.txt == "
class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: E = None
        self.y: G = None
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: E = None
        self.u: D = None
        self.y: F = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: B = None
        self.u: B = None
        self.v: F = None
        self.y: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: E = None
        self.y: A = None
        self.v: I = None
        self.u: I = None
        self.o: A = None
        self.p: C = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: C = None
        self.u: C = None
        self.p: F = None
        self.r: E = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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