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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: I = None
        self.q: H = None
        self.x: H = None
        self.r: H = None
        self.p: F = None
        self.t: H = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: D = None
        self.v: B = None
        self.o: C = None
        self.z: H = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: I = None
        self.q: H = None
        self.x: H = None
        self.r: H = None
        self.p: F = None
        self.t: H = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: D = None
        self.v: B = None
        self.o: C = None
        self.z: H = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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

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