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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: B = None
        self.t: I = None
        self.w: E = None
        self.x: F = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: B = None
        self.t: I = None
        self.w: E = None
        self.x: F = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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