class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: F = None
        self.s: A = None
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: A = None
        self.x: I = None
        self.u: E = None
        self.p: H = None
        self.s: I = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: G = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: F = None
        self.s: A = None
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: A = None
        self.x: I = None
        self.u: E = None
        self.p: H = None
        self.s: I = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: G = None
        self.p: E = None
        self.txt = txt

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

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